//
//  PracticeCollectionViewModel.swift
//  XingCeHelper
//
//  Created by 申铭 on 2022/12/5.
//

import UIKit

class PracticeCollectionViewModel {

    func loadDatas() -> [BaseSectionModel] {
        var sections = [BaseSectionModel]()
        var oneModels = [BaseCellModel]()
        var calcModels = [BaseCellModel]()
        
        let model1 = PracticeCollectionCellModel(type: .reciteIdiom)
        let model2 = PracticeCollectionCellModel(type: .reciteSpecification)
        let model3 = PracticeCollectionCellModel(type: .reciteIssuesAndMeasure)
        oneModels.append(model1)
        oneModels.append(model2)
        oneModels.append(model3)
        
        let calcModel1 = PracticeCollectionCellModel(type: .twoDigitSubtraction)
        let calcModel11 = PracticeCollectionCellModel(type: .twoDigitAddition)
        let calcModel2 = PracticeCollectionCellModel(type: .threeDigitSubtraction)
        let calcModel22 = PracticeCollectionCellModel(type: .threeDigitAddition)
        let calcModel3 = PracticeCollectionCellModel(type: .twoDigitMultiplyOneDigit)
        let calcModel4 = PracticeCollectionCellModel(type: .twoDigitDivisionOneDigit)
        let calcModel5 = PracticeCollectionCellModel(type: .exponentiation)
        let calcModel6 = PracticeCollectionCellModel(type: .base)
        let calcModel7 = PracticeCollectionCellModel(type: .fraction2Decimal)
        let calcModel8 = PracticeCollectionCellModel(type: .decimal2Fraction)
        
        calcModels.append(calcModel11)
        calcModels.append(calcModel1)
        calcModels.append(calcModel22)
        calcModels.append(calcModel2)
        calcModels.append(calcModel3)
        calcModels.append(calcModel4)
        calcModels.append(calcModel7)
        calcModels.append(calcModel8)
        calcModels.append(calcModel5)
        calcModels.append(calcModel6)
       
        
        sections.append(BaseSectionModel(items: oneModels))
        sections.append(BaseSectionModel(items: calcModels))
        
        return sections
    }
}
